package com.feige.pojo.vo;


import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel(value = "前端路由")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class FrontRouteVo {

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "访问路径")
    private String path;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面")
    private Boolean alwaysShow;

    @ApiModelProperty(value = "重定向")
    private String redirect;

    @ApiModelProperty(value = "显示状态(false表示不隐藏，true表示隐藏）")
    private Boolean hidden;

    @ApiModelProperty(value = "路由标题和图标")
    private  MetaVo meta;

    @ApiModelProperty(value = "下级")
    private List<FrontRouteVo> children;

    public FrontRouteVo() {
    }

    public FrontRouteVo(String name, String path, String component, Boolean alwaysShow, String redirect, boolean hidden, MetaVo meta, List<FrontRouteVo> children) {
        this.name = name;
        this.path = path;
        this.component = component;
        this.alwaysShow = alwaysShow;
        this.redirect = redirect;
        this.hidden = hidden;
        this.meta = meta;
        this.children = children;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public Boolean getAlwaysShow() {
        return alwaysShow;
    }

    public void setAlwaysShow(Boolean alwaysShow) {
        this.alwaysShow = alwaysShow;
    }

    public String getRedirect() {
        return redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }

    public Boolean getHidden() {
        return hidden;
    }

    public void setHidden(Boolean hidden) {
        this.hidden = hidden;
    }

    public MetaVo getMeta() {
        return meta;
    }

    public void setMeta(MetaVo meta) {
        this.meta = meta;
    }

    public List<FrontRouteVo> getChildren() {
        return children;
    }

    public void setChildren(List<FrontRouteVo> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "FrontRouteVo{" +
                "name='" + name + '\'' +
                ", path='" + path + '\'' +
                ", component='" + component + '\'' +
                ", alwaysShow=" + alwaysShow +
                ", redirect='" + redirect + '\'' +
                ", hidden=" + hidden +
                ", meta=" + meta +
                ", children=" + children +
                '}';
    }
}
